﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WikiPediaPlugin
{
    public partial class frmOptions : Form
    {
        private PluginSettings m_settings;
        public frmOptions(PluginSettings settings)
        {
            m_settings = settings;
            InitializeComponent();
            chbxNoGui.Checked = m_settings.ShowGUI;
            foreach (string name in m_settings.languagenames)
            {
                cbxLanguage.Items.Add(name);
            }
            cbxLanguage.SelectedIndex = m_settings.LanguageNumber;
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            m_settings.ShowGUI = chbxNoGui.Checked;
            m_settings.LanguageNumber = cbxLanguage.SelectedIndex;
            this.Close();
        }
    }
}
